package org.reborn.utils

object ListUtil {

  def removeAtIndex[T](list:List[T],index:Int):List[T] = {
	val front = list.slice(0,index);
	val back = list.slice(index+1, list.size)
	
	front ::: back
  }
  
  def replaceAtIndex[T](list:List[T],value:T,index:Int):List[T] = {
	val front = list.slice(0,index);
	val back = list.slice(index+1, list.size)
	
	front ::: (value :: back)
  }
}
